brush
Type
property
Summary
Specifies the shape used for painting with the Brush tool.
Syntax
set the brush to {<brushID> | <imageID>}
Description
Use the brush property to specify which shape is painted by the Brush tool.
The entire area of the brush cursor is used as the brush shape. The shape painted by the brush is drawn in the brushColor, regardless of what colors might be in the image used for the brush shape.
When the Brush tool is in use, the cursor is the same as the brush shape. You can use any size image as a brush, but the cursor may appear distorted on some systems if the image is not 16x16 pixels.
In order to use a brush, you must choose the Brush tool using either the Paint Tools palette or the choose command.
If you want to change the brush property in a standalone application--for example, to let the user paint in images--you must copy the stack "revCompatibilityBrushes1" into your application before you build the standalone. (This stack includes the cursors used for the brush tool.) To copy the stack, enter the following into the message box or a handler :
clone stack \"revCompatibilityBrushes1\"
set the mainStack of this stack to \"My Main Stack\"
-- (substitute your application\'s main stack name
A copy of "revCompatibilityBrushes1" is now a substack of your main stack, and will be saved in the stack file the next time you save the main stack.
If you want to create your own brush cursors, clone the "revCompatibilityBrushes1" stack and change the images in it to the desired shapes. Make sure to include the stack when you build the standalone.
Examples
set the brush to 13
set the brush to the short ID of image "My Custom Brush"
Related
command: choose
glossary: property, handler, current stack, standalone application, command
keyword: brush, message box, image
Compatibility and Support
Introduced
LiveCode 1.0
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile